export const rules = {
  name: [{
    required: true,
    message: "please enter name",
    trigger: "blur"
  }],
  sku: [{
    required: true,
    message: "please enter sku",
    trigger: "blur"
  }],
  category_id: [{
    required: true,
    message: "please enter category",
    trigger: "change"
  }],
  packaging: [{
    required: true,
    message: "please enter packaging",
    trigger: "blur"
  }],
  brand_id: [{
    required: true,
    message: "please enter brand",
    trigger: "blur"
  }],
  price: [{
    required: true,
    message: "please enter price",
    trigger: "blur"
  }],
  uom: [{
    required: true,
    message: "please enter uom",
    trigger: "blur"
  }],
  rop: [{
    required: true,
    message: "please enter rop",
    trigger: "blur"
  }]
};

export function Model(
  uom_sku = "KG",
  name = "",
  status = "Normal",
  sku = "",
  rop = "",
  uom = "",
  suppliers = "suppliers 01",
  price = "",
  brand_id = 1,
  packaging = "Bottle",
  image = "",
  remark = "",
  category_id = null
) {
  this.uom_sku = uom_sku
  this.name = name;
  this.status = status;
  this.sku = sku;
  this.rop = rop;
  this.uom = uom;
  this.suppliers = suppliers;
  this.price = price;
  this.brand_id = brand_id;
  this.packaging = packaging;
  this.image = image;
  this.remark = remark;
  this.category_id = category_id;
}